import React from "react";
import "./App.css";
// import Header from "./components/Header/Header";
// import Footer from "./components/Footer/Footer";
// import Middle from "./components/Middle/Middle";
// import Mvcont from "./components/MvCont/Mvcont";
import { useRoutes } from "react-router-dom";
import { routers } from "./roter";
import Nav from "./components/Nav/Nav";
import "./redux/store";

// import A from "./components/A/A";

function App() {
  let router = useRoutes(routers); //使用路由hook

  return (
    <>
      {/* <Home></Home>
        <Ref></Ref>
        <Hooks></Hooks>
        <Todolist></Todolist>
        <Heros></Heros>
        <Duanzi></Duanzi> */}

      <Nav></Nav>
      {router}

      {/* <Routes>
          <Route path="/home" element={<Home></Home>} />
          <Route path="/ref" element={<Ref></Ref>} />
          <Route path="/hooks" element={<Hooks></Hooks>} />
          <Route path="/todolist" element={<Todolist></Todolist>} />
          <Route path="/Heros" element={<Heros></Heros>} />
          <Route path="/duanzi" element={<Duanzi></Duanzi>} />
          <Route path="/news" element={<News></News>}> */}
      {/* news 二的级路由 */}
      {/* <Route path="/news/guonei" element={<Guonei></Guonei>}></Route>
            <Route path="/news/junshi" element={<Junshi></Junshi>}></Route>
            <Route index element={<Navigate to="/news/guonei" />}></Route>
          </Route>
          <Route path="*" element={<NotFound></NotFound>}></Route>
        </Routes> */}
    </>
  );
}

export default App;
